#coding:utf-8
from flask import Flask
from flask_restful import Api, Resource
#from app import app

from hello import HelloWorld
from qiniu_token import BuildToken,BuildTokenV1
from filter_words import FilterWords
from dominant_color import DominantColor
from weather import Weather

app = Flask(__name__)
api = Api(app)

api.add_resource(HelloWorld, '/hello/')
api.add_resource(BuildToken, '/getToken/<key>')
api.add_resource(BuildTokenV1, '/buildToken/')
api.add_resource(FilterWords, '/filterWords/<content>')
api.add_resource(DominantColor, '/dominantColor/')
api.add_resource(Weather, '/weather/<arg_province>/<arg_city>')

if __name__ == '__main__':
    #app.run(host='0.0.0.0', port='8383', debug=True)
    app.run(host='0.0.0.0', port='8001')